<template>
	<view class="Recommend">
		<view class="team-top">
			<view class="box">
				<text>邀请奖</text>
				<text class="number">{{reward.register_reward}}</text>
			</view>
			<view class="box">
				<text>团队奖</text>
				<text class="number">{{reward.team_reward}}</text>
			</view>
		</view>
		<view class="team-list">
			<view class="title">
				<text class="icon"></text>
				<text class="tit">推荐奖励规则</text>
			</view>
			<view class="info">
				<text class="zt">直推奖：直推用户投资额百分之6</text>
				<text>团队奖：</text>
				<text>VIP1（直推不足三人）可以拿一代百分之6</text>
				<text>VIP2(直推3个VIP1)拿二代百分之5</text>
				<text>VIP3直推三个VIP2拿三代百分之3</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				reward: []
			};
		},
		onLoad() {
			this.getData();
		},
		methods: {
			getData: function() {
				const _this = this;
				//获取用户信息
				this.$request.get("/api/ucenter/getReward", {})
					.then(res => {
						if (res.data.code == 1) {
							_this.reward = res.data.data;
						}
					})
					.catch(error => {
						console.error('error:', error);
					});
			},
		},
	}
</script>

<style lang="less">
	.Recommend {
		background-color: #F1F1F1;
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;

		.team-top {
			width: 96%;
			height: 100px;
			background-color: #FFFFFF;
			display: flex;
			border-top: 5px solid #F1F1F1;
			border-bottom: 10px solid #F1F1F1;
			font-size: 12px;
			color: #707070;

			.box {
				flex: 1;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;

				.number {
					color: #03AD8F;
					font-size: 22px;
				}
			}
		}

		.team-list {
			width: 96%;
			background-color: #FFFFFF;
			flex: 1;
			font-size: 12px;
			color: #24435D;

			.title {
				display: flex;
				height: 50px;
				align-items: center;

				.icon {
					width: 6px;
					height: 30px;
					background: rgba(39, 146, 229, 1);

				}

				.tit {
					font-size: 22px;
					flex: 1;
					padding-left: 16px;
				}
			}

			.info {
				display: flex;
				flex-direction: column;
				line-height: 60upx;
				padding-left: 22px;

				.zt {
					line-height: 60px;

				}
			}
		}
	}
</style>
